<template>
  <hr />
  <p>这是孙子组件Child</p>
  <hr />
  <input type="text" ref="input2" />
</template>

<script>
import { provide, inject,ref,onMounted } from 'vue'
export default {
  name: 'Child',
  setup() {
    let bb = inject('aaa')
    const input2 = ref(null)
    console.log("input2",input2);
    console.log(bb,"bbbbbb")
    onMounted(()=>{
      console.log("input22222",input2);
    })
    return {
      input2
    }
  },
}
</script>

<style></style>
